MCS_FLAGS = -debug -nowarn:0169

if LINUX
MCS_FLAGS += -define:LINUX
endif

if WINDOWS
MCS_FLAGS += -define:WINDOWS
endif

ASSEMBLY_NAME = Dashboard.Engine
ASSEMBLY = $(ASSEMBLY_NAME).dll

dashboarddir = $(pkglibdir)
dashboard_SCRIPTS = $(ASSEMBLY) $(ASSEMBLY).mdb

ASSEMBLY_REFERENCES = \
	-r:../Dashboard/Dashboard.dll \
	-r:../Dashboard.Util/Dashboard.Util.dll \
	-r:Mono.Posix \
	-r:Mono.Data.Sqlite \
	-r:System.Web \
	$(GLIBSHARP_LIBS) \
	$(DBUSSHARP_LIBS) \
	$(MONOADDINS_LIBS) \
	$(BEAGLE_LIBS)

ASSEMBLY_SOURCES =  \
	AssemblyInfo.cs \
	Dashboard.Engine.Backends/BeagleBackend.cs \
	Dashboard.Engine.Backends/BugzillaBackend.cs \
	Dashboard.Engine.Backends/GazetteerBackend.cs \
	Dashboard.Engine.Backends/GoogleCalculatorBackend.cs \
	Dashboard.Engine.Backends/LastfmBackend.cs \
	Dashboard.Engine.Backends/RssBackend.cs \
	Dashboard.Engine.Backends/TextProcessorBackend.cs \
	Dashboard.Engine.Backends/TwitterBackend.cs \
	Dashboard.Engine.Fidelity/Tracker.cs \
	Dashboard.Engine.Fidelity/IScanner.cs \
	Dashboard.Engine.Fidelity/IwTools.cs \
	Dashboard.Engine.Fidelity/Location.cs \
	Dashboard.Engine.Fidelity/Network.cs \
	Dashboard.Engine.Fidelity/Store.cs \
	Dashboard.Engine.Metadata/IMetadataStore.cs \
	Dashboard.Engine.Metadata/MetadataStore.cs \
	Dashboard.Engine.Metadata/MetadataStoreProxy.cs \
	Dashboard.Engine.Transports/DBusTransport.cs \
	Dashboard.Engine.Transports/FileTransport.cs \
	Dashboard.Engine.Transports/TcpTransport.cs \
	Dashboard.Engine.Transports/UnixTransport.cs \
	Dashboard.Engine.Transports/XmlConnectionHandler.cs \
	Dashboard.Engine/AlphaVersionMessageComponent.cs \
	Dashboard.Engine/Backend.cs \
	Dashboard.Engine/BackendManager.cs \
	Dashboard.Engine/ComponentManager.cs \
	Dashboard.Engine/Engine.cs \
	Dashboard.Engine/IComponent.cs \
	Dashboard.Engine/IService.cs \
	Dashboard.Engine/Log.cs \
	Dashboard.Engine/MessageBroker.cs \
	Dashboard.Engine/NetworkManager.cs \
	Dashboard.Engine/Rule.cs

$(ASSEMBLY): $(ASSEMBLY_SOURCES)
	$(MCS) $(MCS_FLAGS) -target:library -out:$@ $(ASSEMBLY_REFERENCES) $(ASSEMBLY_SOURCES)

EXTRA_DIST = \
	$(ASSEMBLY_SOURCES) \
	AssemblyInfo.cs.in

CLEANFILES = $(ASSEMBLY) *.dll *.exe *.pidb
DISTCLEANFILES = *.mdb
MAINTAINERCLEANFILES = Makefile.in
